import request from '@/utils/request';
import {AxiosPromise} from 'axios';
import {RepoCompModelVersionPageResult, RepoCompQueryParam,} from './types';

export function listRepoCompVersionEntityPages(queryParams: RepoCompQueryParam): AxiosPromise<RepoCompModelVersionPageResult> {
    return request({
        url: '/manager/repository/component/model/version/page',
        method: 'post',
        data: queryParams,
    });
}

export function getRepoCompObjectEntity(versionId: string, objectId: string) {
    return request({
        url: '/manager/repository/component/model/version/object/entity',
        method: 'post',
        data: {
            versionId: versionId,
            objectId: objectId
        },
    });
}
